<!--
 * @Author: your name
 * @Date: 2021-11-17 10:14:11
 * @LastEditTime: 2021-11-17 11:01:35
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \app\src\views\vant\index.vue
-->
<template>
  <div>
    <van-nav-bar
      :title="title || 'vant'"
      left-text="返回"
      left-arrow
      fixed
      placeholder
      safe-area-inset-top
      @click-left="
        () => {
          $router.go(-1);
        }
      "
    />
    <router-view />
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: "",
    };
  },
  watch: {
    $route: {
      handler({ meta: { title } }) {
        this.title = title;
      },
      immediate: true,
    },
  },
};
</script>

<style lang="less" scoped>
</style>